package edu.zut.hb.software.train.OrderManager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.train.Order.dao.OrderDao;
import edu.zut.hb.software.train.Order.domain.Order;
import edu.zut.hb.software.train.OrderManager.service.OrderManager;




@Service("orderManager")
public class OrderManagerImpl extends GenericManagerImpl<Order, Long> implements OrderManager {

	
	OrderDao orderDao;
	
	@Autowired
	public void setOrderDao(OrderDao orderDao) {
		this.orderDao = orderDao;
		this.dao = this.orderDao;
	}

	@Override
	public List<Order> getAll() {
		List<Order> all = this.orderDao.findAll();
		if (logger.isInfoEnabled()) {
			logger.info("getAll() - List<Order> all={}", all); //$NON-NLS-1$
		}
		return all;
	}
 
}